<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta name="Content-Type" content="text/html; charset=utf-8" />
<title>Module: Ensembl::Core</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '..';
  if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>

  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="../_index.html">Index (C)</a> &raquo; 
    <span class='title'><span class='object_link'><a href="../Ensembl.html" title="Ensembl (module)">Ensembl</a></span></span>
     &raquo; 
    <span class="title">Core</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  <a id="class_list_link" href="#">Class List</a>
  <a id="method_list_link" href="#">Method List</a>
  <a id ="file_list_link" href="#">File List</a>
</div>

      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Module: Ensembl::Core
  
  
  
</h1>

<dl class="box">
  
  
    
  
    
  
  
  
    <dt class="r1 last">Defined in:</dt>
    <dd class="r1 last">lib/ensembl/core/activerecord.rb<span class="defines">,<br />
  lib/ensembl/core/slice.rb,<br /> lib/ensembl/core/project.rb,<br /> lib/ensembl/db_connection.rb,<br /> lib/ensembl/core/transform.rb,<br /> lib/ensembl/core/transcript.rb,<br /> lib/ensembl/core/collection.rb</span>
</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>
The Ensembl::Core module covers the core databases from
ensembldb.ensembl.org and covers mainly sequences and their annotations.
For a full description of the database (and therefore the classes that are
available), see http://www.ensembl.org/info/software/core/schema/index.html
and
http://www.ensembl.org/info/software/core/schema/schema_description.html
</p>


  </div>
</div>
<div class="tags">
  
</div><h2>Defined Under Namespace</h2>
<p class="children">
   
    
      <strong class="modules">Modules:</strong> <span class='object_link'><a href="Core/Sliceable.html" title="Ensembl::Core::Sliceable (module)">Sliceable</a></span>
    
   
    
      <strong class="classes">Classes:</strong> <span class='object_link'><a href="Core/Analysis.html" title="Ensembl::Core::Analysis (class)">Analysis</a></span>, <span class='object_link'><a href="Core/AnalysisDescription.html" title="Ensembl::Core::AnalysisDescription (class)">AnalysisDescription</a></span>, <span class='object_link'><a href="Core/AssemblyException.html" title="Ensembl::Core::AssemblyException (class)">AssemblyException</a></span>, <span class='object_link'><a href="Core/AssemblyLink.html" title="Ensembl::Core::AssemblyLink (class)">AssemblyLink</a></span>, <span class='object_link'><a href="Core/AttribType.html" title="Ensembl::Core::AttribType (class)">AttribType</a></span>, <span class='object_link'><a href="Core/Collection.html" title="Ensembl::Core::Collection (class)">Collection</a></span>, <span class='object_link'><a href="Core/CoordSystem.html" title="Ensembl::Core::CoordSystem (class)">CoordSystem</a></span>, <span class='object_link'><a href="Core/DBConnection.html" title="Ensembl::Core::DBConnection (class)">DBConnection</a></span>, <span class='object_link'><a href="Core/DensityFeature.html" title="Ensembl::Core::DensityFeature (class)">DensityFeature</a></span>, <span class='object_link'><a href="Core/DensityType.html" title="Ensembl::Core::DensityType (class)">DensityType</a></span>, <span class='object_link'><a href="Core/Dna.html" title="Ensembl::Core::Dna (class)">Dna</a></span>, <span class='object_link'><a href="Core/DnaAlignFeature.html" title="Ensembl::Core::DnaAlignFeature (class)">DnaAlignFeature</a></span>, <span class='object_link'><a href="Core/Exon.html" title="Ensembl::Core::Exon (class)">Exon</a></span>, <span class='object_link'><a href="Core/ExonStableId.html" title="Ensembl::Core::ExonStableId (class)">ExonStableId</a></span>, <span class='object_link'><a href="Core/ExonSupportingFeature.html" title="Ensembl::Core::ExonSupportingFeature (class)">ExonSupportingFeature</a></span>, <span class='object_link'><a href="Core/ExonTranscript.html" title="Ensembl::Core::ExonTranscript (class)">ExonTranscript</a></span>, <span class='object_link'><a href="Core/ExternalDb.html" title="Ensembl::Core::ExternalDb (class)">ExternalDb</a></span>, <span class='object_link'><a href="Core/ExternalSynonym.html" title="Ensembl::Core::ExternalSynonym (class)">ExternalSynonym</a></span>, <span class='object_link'><a href="Core/Gap.html" title="Ensembl::Core::Gap (class)">Gap</a></span>, <span class='object_link'><a href="Core/Gene.html" title="Ensembl::Core::Gene (class)">Gene</a></span>, <span class='object_link'><a href="Core/GeneAttrib.html" title="Ensembl::Core::GeneAttrib (class)">GeneAttrib</a></span>, <span class='object_link'><a href="Core/GeneStableId.html" title="Ensembl::Core::GeneStableId (class)">GeneStableId</a></span>, <span class='object_link'><a href="Core/GoXref.html" title="Ensembl::Core::GoXref (class)">GoXref</a></span>, <span class='object_link'><a href="Core/Intron.html" title="Ensembl::Core::Intron (class)">Intron</a></span>, <span class='object_link'><a href="Core/Karyotype.html" title="Ensembl::Core::Karyotype (class)">Karyotype</a></span>, <span class='object_link'><a href="Core/Map.html" title="Ensembl::Core::Map (class)">Map</a></span>, <span class='object_link'><a href="Core/Marker.html" title="Ensembl::Core::Marker (class)">Marker</a></span>, <span class='object_link'><a href="Core/MarkerFeature.html" title="Ensembl::Core::MarkerFeature (class)">MarkerFeature</a></span>, <span class='object_link'><a href="Core/MarkerMapLocation.html" title="Ensembl::Core::MarkerMapLocation (class)">MarkerMapLocation</a></span>, <span class='object_link'><a href="Core/MarkerSynonym.html" title="Ensembl::Core::MarkerSynonym (class)">MarkerSynonym</a></span>, <span class='object_link'><a href="Core/Meta.html" title="Ensembl::Core::Meta (class)">Meta</a></span>, <span class='object_link'><a href="Core/MetaCoord.html" title="Ensembl::Core::MetaCoord (class)">MetaCoord</a></span>, <span class='object_link'><a href="Core/MiscAttrib.html" title="Ensembl::Core::MiscAttrib (class)">MiscAttrib</a></span>, <span class='object_link'><a href="Core/MiscFeature.html" title="Ensembl::Core::MiscFeature (class)">MiscFeature</a></span>, <span class='object_link'><a href="Core/MiscFeatureMiscSet.html" title="Ensembl::Core::MiscFeatureMiscSet (class)">MiscFeatureMiscSet</a></span>, <span class='object_link'><a href="Core/MiscSet.html" title="Ensembl::Core::MiscSet (class)">MiscSet</a></span>, <span class='object_link'><a href="Core/ObjectXref.html" title="Ensembl::Core::ObjectXref (class)">ObjectXref</a></span>, <span class='object_link'><a href="Core/OligoArray.html" title="Ensembl::Core::OligoArray (class)">OligoArray</a></span>, <span class='object_link'><a href="Core/OligoFeature.html" title="Ensembl::Core::OligoFeature (class)">OligoFeature</a></span>, <span class='object_link'><a href="Core/OligoProbe.html" title="Ensembl::Core::OligoProbe (class)">OligoProbe</a></span>, <span class='object_link'><a href="Core/PredictionExon.html" title="Ensembl::Core::PredictionExon (class)">PredictionExon</a></span>, <span class='object_link'><a href="Core/PredictionTranscript.html" title="Ensembl::Core::PredictionTranscript (class)">PredictionTranscript</a></span>, <span class='object_link'><a href="Core/ProteinAlignFeature.html" title="Ensembl::Core::ProteinAlignFeature (class)">ProteinAlignFeature</a></span>, <span class='object_link'><a href="Core/ProteinFeature.html" title="Ensembl::Core::ProteinFeature (class)">ProteinFeature</a></span>, <span class='object_link'><a href="Core/RegulatoryFactor.html" title="Ensembl::Core::RegulatoryFactor (class)">RegulatoryFactor</a></span>, <span class='object_link'><a href="Core/RegulatoryFeature.html" title="Ensembl::Core::RegulatoryFeature (class)">RegulatoryFeature</a></span>, <span class='object_link'><a href="Core/RepeatConsensus.html" title="Ensembl::Core::RepeatConsensus (class)">RepeatConsensus</a></span>, <span class='object_link'><a href="Core/RepeatFeature.html" title="Ensembl::Core::RepeatFeature (class)">RepeatFeature</a></span>, <span class='object_link'><a href="Core/SeqRegion.html" title="Ensembl::Core::SeqRegion (class)">SeqRegion</a></span>, <span class='object_link'><a href="Core/SeqRegionAttrib.html" title="Ensembl::Core::SeqRegionAttrib (class)">SeqRegionAttrib</a></span>, <span class='object_link'><a href="Core/SimpleFeature.html" title="Ensembl::Core::SimpleFeature (class)">SimpleFeature</a></span>, <span class='object_link'><a href="Core/Slice.html" title="Ensembl::Core::Slice (class)">Slice</a></span>, <span class='object_link'><a href="Core/Transcript.html" title="Ensembl::Core::Transcript (class)">Transcript</a></span>, <span class='object_link'><a href="Core/TranscriptAttrib.html" title="Ensembl::Core::TranscriptAttrib (class)">TranscriptAttrib</a></span>, <span class='object_link'><a href="Core/TranscriptStableId.html" title="Ensembl::Core::TranscriptStableId (class)">TranscriptStableId</a></span>, <span class='object_link'><a href="Core/TranscriptSupportingFeature.html" title="Ensembl::Core::TranscriptSupportingFeature (class)">TranscriptSupportingFeature</a></span>, <span class='object_link'><a href="Core/Translation.html" title="Ensembl::Core::Translation (class)">Translation</a></span>, <span class='object_link'><a href="Core/TranslationAttrib.html" title="Ensembl::Core::TranslationAttrib (class)">TranslationAttrib</a></span>, <span class='object_link'><a href="Core/TranslationStableId.html" title="Ensembl::Core::TranslationStableId (class)">TranslationStableId</a></span>, <span class='object_link'><a href="Core/Xref.html" title="Ensembl::Core::Xref (class)">Xref</a></span>
    
  
</p>



  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#canonical_transcript-instance_method" title="#canonical_transcript (instance method)">- (Object) <strong>canonical_transcript</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
The Gene#canonical_transcript returns the longest transcript for that gene.
</p>
</div></span>
  
</li>

      
    </ul>
  



  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="canonical_transcript-instance_method">
  
    - (<tt>Object</tt>) <strong>canonical_transcript</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
The Gene#canonical_transcript returns the longest transcript for that gene.
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


1136
1137
1138
1139</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/ensembl/core/activerecord.rb', line 1136</span>

<span class='def def kw'>def</span> <span class='canonical_transcript identifier id'>canonical_transcript</span>
 <span class='ct identifier id'>ct</span> <span class='assign token'>=</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='transcripts identifier id'>transcripts</span><span class='dot token'>.</span><span class='sort identifier id'>sort</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='a identifier id'>a</span><span class='comma token'>,</span><span class='b identifier id'>b</span><span class='bitor op'>|</span> <span class='b identifier id'>b</span><span class='dot token'>.</span><span class='seq identifier id'>seq</span><span class='dot token'>.</span><span class='length identifier id'>length</span> <span class='cmp op'>&lt;=&gt;</span> <span class='a identifier id'>a</span><span class='dot token'>.</span><span class='seq identifier id'>seq</span><span class='dot token'>.</span><span class='length identifier id'>length</span><span class='rbrace token'>}</span>
 <span class='return return kw'>return</span> <span class='ct identifier id'>ct</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Wed Dec 15 19:18:18 2010 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.6.3 (ruby-1.8.7).
</div>

  </body>
</html>